package com.lb.uts.client.model;

import java.util.Map;

/**
 * 统一权限客户端常量
 */
public class UtsClientConstants {

    /**
     * 批量执行任务之第几台服务
     */
    public static final String BATCH_PAGE_NO = "batchPageNo";

    /**
     * 批量执行任务的服务总数
     */
    public static final String BATCH_PAGE_TOTAL = "batchPageTotal";

    /**
     * 脚本的定时任务的特殊前缀-类
     */
    public static final String SCRIPT_SERVICE = "SS_";

    /**
     * 脚本的定时任务的特殊前缀-方法
     */
    public static final String SCRIPT_METHOD = "SM_";

    /**
     * 脚本类型
     */
    public static final String SCRIPT_TYPE="scriptType";

    /**
     * 脚本路径
     */
    public static final String SCRIPT_PATH="scriptPath";

    private static volatile ThreadLocal<Map<String, Object>> batchThreadLocal = new ThreadLocal();

    public static final void put(Map<String, Object> value) {
        batchThreadLocal.set(value);
    }


    public static final Map<String, Object> get() {
        return batchThreadLocal.get();
    }

    public static final void remove(){
        batchThreadLocal.remove();
    }
}
